import axios from '@/utils/request'

export const login = data => {
  return axios({
    method: 'post',
    url: '/v1_0/authorizations',
    data
  })
}

// 验证短信
export const sendSms = mobile => {
  return axios({
    method: 'get',
    url: `/v1_0/sms/codes/${mobile}`
  })
}

// 获取自己的数据信息
export const getUserInfo = () => {
  return axios({
    method: 'get',
    url: '/v1_0/user'
    // headers: {
    //   Authorization: `Bearer ${store.state.user.token}`
    // }
  })
}
// 获取频道数据
export const getUserChannels = () => {
  return axios({
    method: 'get',
    url: '/v1_0/user/channels'
  })
}
